﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentValidation.Results;
using FluentValidation;

namespace RevClinic.Core.Commands
{
    public abstract class CommandBase<TModel> : ICommand<TModel>
        where TModel : new()
    {
        public TModel Model { get; set; }

        public CommandBase(TModel model)
        {
            Model = model;
        }

        public CommandBase(Action<TModel> modelInit)
            : this(new TModel())
        {
            modelInit(Model);
        }

        public abstract string CommandName { get; }
    }
}
